<template>
  <div id="app">
    <!--导航链接-->
    <nav>
      <router-link to="/home" activeClass="active">首页</router-link>
      <router-link to="/hello">你好</router-link>
      <router-link to="/list">列表</router-link>
    </nav>
    <!--路由出口-->
    <div class="container">
      <router-view></router-view>
    </div>
    <Movie></Movie>
  </div>
</template>
 
<script>
import Child from './components/Child'
import Girl from './components/Girl'
import Boy from './components/Boy'
import Article from './components/Article'
import Movie from './components/Movie'


export default {
  name: 'App', 
  data(){
    return{
      money:999,
      numb:0
    } 
  },
  components: {
    Child,
    Girl,
    Boy,
    Article,
    Movie
  },
  methods:{
    //3.在事件函数中 收到子组件的数据
    getDataFromChild(num){
      console.log('收到从子组件传递过来的参数',num)
      this.numb =num
    }
  }
}
</script>

<style>
.container{
  width: 200px;
  width: 200px;
  border: 1px solid red;
}
.active{
  color: red;
  border-bottom: 1px solid #ccc;
  text-decoration: none;
}
</style>
